<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>我的房屋</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
    <link rel="stylesheet" href="../../css/adminFragment.css">
</head>

<body>
<div>
    <div  th:insert="userFragment::fragment-name"></div>
    <div style="height: 200px"></div>
    <div style="width: 800px;margin: auto;background-color: white">
        <div style="padding: 40px">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th scope="col">图片</th>
                    <th scope="col">房源</th>
                    <th scope="col">房屋类型</th>
                    <th scope="col">楼层</th>
                    <th scope="col">价格</th>
                    <th scope="col">详情</th>
                </tr>
                </thead>
                <tbody>
                <th:block th:each="hn:${pageInfo}">
                    <tr>
                        <td style="text-align: center"><img th:src="${hn.getImg}" alt="" style="height: 40px;width: 40px"></td>
                        <td th:text="${hn.homeTitle}"></td>
                        <td th:text="${hn.homeType}"></td>
                        <td th:text="${hn.floor}"></td>
                        <td th:text="${hn.price}"></td>
                        <td><a th:href="'/userCon/toUserDelSend/'+${hn.getId}">详情</a></td>
                    </tr>
                </th:block>
                </tbody>
            </table>
        </div>


        <!--分页尾部导航-->
        <nav aria-label="Page navigation example">
            <ul class="pagination">
                <li class="page-item">
                    <th:block th:if="${pageNo>1}">
                        <a class="page-link" th:href="'/userCon/housePage1/'+${pageNo-1}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                            <span class="sr-only">Previous</span>
                        </a>
                    </th:block>
                    <th:block th:if="${pageNo==1}">
                        <a class="page-link" href="#" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                            <span class="sr-only">Previous</span>
                        </a>
                    </th:block>
                </li>
                <th:block th:each="pn:${rainbow}">
                    <li class="page-item"><a class="page-link" th:href="'/userCon/housePage1/'+${pn}" th:text="${pn}"></a></li>
                </th:block>
                <li class="page-item">
                    <th:block  th:if="${pageNo>=totalPages}">
                        <a class="page-link" href="#" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                            <span class="sr-only">Next</span>
                        </a>
                    </th:block>
                    <th:block th:if="${pageNo<totalPages}">
                        <a class="page-link" th:href="'/userCon/housePage1/'+${pageNo+1}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                            <span class="sr-only">Next</span>
                        </a>
                    </th:block>
                </li>
            </ul>
        </nav>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
</body>